//
// Created by NASA on 2023/6/27.
// 先实现将字符串按照','分割分别存入数组
//


#include <iostream>
#include <vector>

using namespace std;
int main() {
    int len=0;
    string s = "seHJ12!@,sjdkffH$123,sdf!@&12HDHa!,123&YUhg@!";
//    cin>>s;
    for (int i = 0; i < s.size(); ++i)
    {
        if(s[i]==',')
        {
            len++;
        }
    }
    len++;
    string l[len];
    int douhao=0;
    int k=0;
    // 以,分割字符串,存入数组中
    for (int i = 0; i < s.size(); ++i)
    {
        if(s[i]==',')
        {
            for (int j = douhao+1; j < i; ++j)
            {
                l[k]+=s[j];
            }
            k++;
            douhao=i;
        }else if(i==s.size()-1)
        {
            for (int j = douhao+1; j < i+1; ++j)
            {
                l[k]+=s[j];
            }
        }
    }
    for (int i = 0; i < len; ++i)
    {
        cout<<l[i]<<endl;
    }
    vector<int> v ;

    return 0;
}